<template>
  <div class="msg-wrapper ui container">
    <div class="ui very relaxed centered grid">
      <div class="twelve wide column">
        <div :class="type" class="ui message">
          <i class="icon close" @click="toclose"></i>
          <div class="header">消息</div>
          <p>{{msg}}</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
  export default{
    data(){
      return {}
    },
    methods:{
      toclose(){
        console.log('dds')
//        $('.message').transition('fade');
        this.$parent.msgShow=false;
        setTimeout(()=> {
//          this.$parent.msg = null;
          this.$parent.msgType = 'error';
        }, 500);

      }
    },
    props: [ 'type', 'msg'],
    created(){

    }
  }
</script>
<style rel="stylesheet/less" lang="less">
  @import "../../common/style/mixin";

  @dir: "common/";
  .msg-wrapper {
    position: absolute;
    left: 0;
    top:0px;
    right:0;
    z-index:30;
    /*width: 100%;*/
    .message{
      p{
        line-height:2;
      }
    }
  }

</style>
